﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Net.Mail;

public partial class ADask : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)

    {
        //(1) Create the MailMessage instance
        MailMessage mm = new MailMessage("service@mail.gowll.com", "service@mail.gowll.com");


        //(2) Assign the MailMessage's properties

        mm.Subject = TextBox1.Text;
        mm.Body = TextBox2.Text;
        mm.IsBodyHtml = false;

        //(3) Create the SmtpClient object
        SmtpClient smtp = new SmtpClient();

        //(4) Send the MailMessage (will use the Web.config settings)
        smtp.Send(mm);
    }
}
